package com.example.usercenter.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Created by zxn on 2018/1/4.
 */
@Component
@ConfigurationProperties(prefix = "gen-code")
public class GenCodeTemplateConfig {
    private String modulePackagePath;
    private String basePackagePath;

    public String getModulePackagePath() {
        return modulePackagePath;
    }

    public void setModulePackagePath(String modulePackagePath) {
        this.modulePackagePath = modulePackagePath;
    }

    public String getBasePackagePath() {
        return basePackagePath;
    }

    public void setBasePackagePath(String basePackagePath) {
        this.basePackagePath = basePackagePath;
    }


    public String getEntityPackagePath() {
        return modulePackagePath+".entity";
    }

    public String getDaoPackagePath() {
        return modulePackagePath+".dao";
    }

    public String getServicePackagePath() {
        return modulePackagePath+".service";
    }

    public String getControllerPackagePath() {
        return modulePackagePath+".web";
    }

    public String getBaseDao() {
        return basePackagePath+".BaseDao";
    }

    public String getBaseService() {
        return basePackagePath+".BaseService";
    }

    public String getBaseController() {
        return basePackagePath+".BaseRestController";
    }

    public String getPageClassPath() {
        return basePackagePath+".Page";
    }

    public String getResponseDataClassPath() {
        return basePackagePath+".ResponseData";
    }
}
